import {ref} from 'vue'
import {defineStore} from "pinia";

export default defineStore('userStore',()=>{
    const userModel = ref({
        uid: -1,//未登录
        adminRole:{
            menuList:[]
        }
    })
    return {
        userModel
    }
},{
    persist:{
        storage: sessionStorage,//存入SessionStorage中,
        paths:['userModel']//把哪个属性,存入SessionStorage
    }
})